package com.app.internationaltravel.controller;

import com.app.internationaltravel.dto.UserDetailDto;
import com.app.internationaltravel.service.intf.UserDetailService;
import com.app.internationaltravel.vo.R;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * @author 刘豆豆
 * @date 2022/12/13
 */
@RestController
@RequestMapping("/api/detail/")
@Api(tags = "实现用户信息的相关操作")
@CrossOrigin //跨域
public class UserDetailController {

  @Resource
  private UserDetailService service;

  @ApiOperation(value = "修改用户信息",notes = "修改用户信息")
  @PostMapping("upData.do")
  public R upData(@RequestBody UserDetailDto dto){
    return service.upData(dto);
  }

  @ApiOperation(value = "查询用户信息",notes = "查询用户信息")
  @GetMapping("queryMy.do")
  public R queryMy(@RequestParam int uid) {
    return service.queryMy(uid);

  }

}
